<?
// mcGallery - Marc Cagninacci - marc@phpforums.net - http://www.phpforums.net

include './galeria/conf.inc.php';
include './galeria/header.php';
include './galeria/shadow.php';
include './galeria/lang/'.$lang;

if ($start=='') { $start=0; }
$album = 5;
$query="SELECT file, title FROM mcgallery WHERE idalbum=$album ORDER BY file LIMIT $start, 6";

// PROCURAR UMA MANEIRA DE BUSCAR OS ULTIMOS EVENTOS
//$query="SELECT id, idalbum, file, title FROM mcgallery, mcgallery_album WHERE mcgallery.idalbum = mcgallery_album.idalbum ORDER BY id DESC LIMIT $start, 5";


//AQUI CODIGO TERMINAR ===========================
$result=mysql_query($query);

?>

<div id="ja-botsl" class="ja-box-br">
  <div class="ja-box-bl">
    <div class="ja-box-tr">
      <div class="ja-box-tl clearfix">
        <h3>Coberturas</h3>
<?
  while ($row2=mysql_fetch_array($result))
  {
  $len= strlen($album);
  $image= substr($row2['file'], ($len + 1));
  $dir = $album .'/' .$image;
  $dirthumb = $album .'/small/' .$image;
  
//  echo $image . '<br>';

        
        echo '<div class="ja-box-center" style="width: 15.9%;">';
        echo '  <div class="module">';
        echo '    <div>';
        echo '      <div>';
        echo '        <div>';
        echo '          <div><a class="highslide" href="galeria/albums/'. $dir .'" onclick="return hs.expand(this)"> <img src="galeria/albums/' . $dirthumb . '" border="0" width="120" height="98" style="border:0px;" /></a></div>';
        echo '        </div>';
        echo '      </div>';
        echo '    </div>';
        echo '  </div>';
        echo '</div>';
		
		}
?>        
      </div>
    </div>
  </div>
</div>
<?
include './footer.php';
?>
